package GUI;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;

public class ventanaComandos extends JDialog {

	private final JPanel contentPanel = new JPanel();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			ventanaComandos dialog = new ventanaComandos();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public ventanaComandos() {
		setBounds(150,0,1024,700);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		
		JButton BotonPedidos = new JButton("");
		BotonPedidos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				panelABMPedidos pedidos = new panelABMPedidos();
				pedidos.setVisible(true);
			}
		});
		BotonPedidos.setIcon(new ImageIcon("Imagenes/Pedidos.jpg"));
		BotonPedidos.setBounds(100, 110, 260, 210);
		contentPanel.add(BotonPedidos);
		
		JButton EditarPedidos = new JButton("ABM Pedidos");
		EditarPedidos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				panelABMPedidos pedidos = new panelABMPedidos();
				pedidos.setVisible(true);
			}
		});
		EditarPedidos.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
		EditarPedidos.setBounds(764, 413, 165, 50);
		contentPanel.add(EditarPedidos);
		
		JButton Historial = new JButton("Historial");
		Historial.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
		Historial.setBounds(764, 512, 165, 50);
		contentPanel.add(Historial);
		
		JButton Camiones = new JButton("ABM Camiones");
		Camiones.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
		Camiones.setBounds(764, 306, 165, 50);
		contentPanel.add(Camiones);
		
		JButton Empleados = new JButton("ABM Empleados");
		Empleados.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				panelABMEmpleados empleados = new panelABMEmpleados();
				empleados.setVisible(true);
			}
		});
		Empleados.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
		Empleados.setBounds(764, 208, 165, 50);
		contentPanel.add(Empleados);
		
		JButton Clientes = new JButton("ABM Clientes");
		Clientes.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 16));
		Clientes.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) 
			{
				panelABMClientes panelCLientes = new panelABMClientes();
				panelCLientes.setVisible(true);
			}
		});
		Clientes.setBounds(764, 110, 165, 50);
		contentPanel.add(Clientes);
		
		JButton button_2 = new JButton("");
		button_2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ventanaPedPendientesMapa panelPedidosPendMapa = new ventanaPedPendientesMapa();
				panelPedidosPendMapa.setVisible(true);
			}
		});
		button_2.setIcon(new ImageIcon("Imagenes/recorridosPendientes.jpg"));
		button_2.setBounds(405, 352, 260, 210);
		contentPanel.add(button_2);
		
		JButton BotonRecorridos = new JButton("");
		BotonRecorridos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				panelABMRecorridos mapaRecorrido = new panelABMRecorridos();
				mapaRecorrido.setVisible(true);
			}
		});
		BotonRecorridos.setIcon(new ImageIcon("Imagenes/recorridos.jpg"));
		BotonRecorridos.setBounds(405, 110, 260, 210);
		contentPanel.add(BotonRecorridos);
		
		JButton button = new JButton("");
		button.setIcon(new ImageIcon("Imagenes/Mapa.jpg"));
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ventanaMapeoTodosLosClientes mapaClientes = new ventanaMapeoTodosLosClientes();
				mapaClientes.setVisible(true);
			}
		});
		button.setBounds(100, 352, 260, 210);
		contentPanel.add(button);
		
		JButton btnNewButton = new JButton("SALIR");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});
		btnNewButton.setVerifyInputWhenFocusTarget(false);
		btnNewButton.setBounds(907, 628, 115, 32);
		contentPanel.add(btnNewButton);
		{
			JLabel fondo = new JLabel("");
			fondo.setBounds(0, 0, 1022, 734);
			contentPanel.add(fondo);
			fondo.setIcon(new ImageIcon("Imagenes/fondo.jpg"));
		}
	}
}
